package com.nb.mapper;

import com.nb.vo.admin.*;
import com.nb.vo.admin.BodyOV.AdminHostitalUpdate;
import com.nb.vo.admin.BodyOV.AdminSettingUpdateCost;
import com.nb.vo.admin.BodyOV.AdminUsersAdd;
import com.nb.vo.admin.BodyOV.AdminUsersUpdate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface AdminMapper {
    String getRoleById(Integer userId);

    List<AdminGetUsers> getAllUsers();

    List<AdminGetUsers> getAllUsers2();

    String getPasswordById(AdminUsersUpdate adminUsersUpdate);

    int updateUserPassword(AdminUsersUpdate adminUsersUpdate);

    int updateDoctorTitle(AdminUsersUpdate adminUsersUpdate);

    int deleteUser(Integer userId);

    int addUser(AdminUsersAdd adminUsersAdd);

    int updateAddAdmin(Integer userId);

    int updateDeteteAdmin(Integer userId);

    AdminSettingBase getHospital();

    int updateHospital(AdminHostitalUpdate adminHostitalUpdate);

    List<AdminSettingStructure> selectStructure();

    List<AdminSettingConsultation> selectConsultation();

    List<AdminSettingAppointment> selectAppointment();

    String getuserIdByAcount(AdminUsersAdd adminUsersAdd);

    int addDoctor(AdminUsersAdd adminUsersAdd);

    int addPatient(AdminUsersAdd adminUsersUpdate);

    int addNurse(AdminUsersAdd adminUsersUpdate);

    List<AdminPermissions> selectPermissions();

    List<AdminSettingCost> selectCost();

    int updateCost(AdminSettingUpdateCost adminSettingUpdateCost);

    /**
     * 插入备份记录
     */
    int insertBackupRecord(Map<String, Object> params);


    /**
     * 获取备份记录列表
     */
    List<BackupRecordVO> getBackupRecords();

    /**
     * 根据ID获取备份文件路径
     */
    String getBackupFilePath(Integer id);
}
